package com.sxt.bus.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.sxt.bus.domain.Goodstype;
import com.sxt.bus.service.GoodstypeService;
import com.sxt.bus.vo.GoodstypeVo;
import com.sxt.sys.common.DataGridView;
import com.sxt.sys.domain.Dept;
import com.sxt.sys.vo.DeptVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2020-01-16
 */
@RestController
@RequestMapping("/p/goodstype")
public class GoodstypeController {

    @Autowired
    private GoodstypeService goodstypeService;

    /**
     * 查询
     */
    @HystrixCommand
    @RequestMapping("loadAllGoodstype")
    public DataGridView loadAllGoodstype() {
        List<Goodstype> list = this.goodstypeService.list();
        return new DataGridView(list);
    }

}

